const mongodb = require('mongodb');
const { MongoClient, ObjectId } = mongodb;
const dbUrl = "mongodb://localhost:27017";

function getMiiduDB() {
    return new Promise((resolve, reject) => {
        MongoClient.connect(dbUrl, { useNewUrlParser: true }, (err, client) => {
            if (err) {
                reject(err);
                return
            }
            let singerCollection = client.db("migu")
            resolve(singerCollection)
        })
    })
}


module.exports = {
    getMiiduDB
}